<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>表格样式</title>
    <style>
        
        table {
            width: 100%;
            height: 400px;
            border-collapse: collapse;
        }

        #bold {
            font-weight: 700;
        }

        tbody {
            text-align: right;
        }

        /* tbody tr>td {
            text-align: left;
        } */
        tr:nth-child(even) {
            background: #b6acac;
        }

        thead:first-child {
            background: black;
            color: white;
        }

        tr:hover {
            background: pink;
            cursor: pointer;
        }

        /* .blue  {
           color: blue;
        } */
        /* tr:nth-child(6) {
            color: blue;
        } */
    </style>
</head>

<body>
    <table>
        <thead>
            <tr>
                <th>名称</th>
                <th>单价</th>
                <th>数量</th>
                <th>合计</th>

            </tr>
        </thead>
        <tbody>
            <tr>
                <td align="left">电磁炉</td>
                <td>128</td>
                <td>2</td>
                <td>256</td>
            </tr>
            <tr>
                <td align="left">电水壶</td>
                <td>50</td>
                <td>10</td>
                <td>500</td>
            </tr>
            <tr>
                <td align="left">电风扇</td>
                <td>99</td>
                <td>1</td>
                <td>99</td>
            </tr>
            <tr id="bold">
                <td align="left">运费</td>
                <td></td>
                <td></td>
                <td>60</td>
            </tr>
            <tr id="bold">
                <td align="left">合计</td>
                <td></td>
                <td></td>
                <td>885</td>
            </tr>
        </tbody>
    </table>
</body>

</html>